﻿<UserControl x:Class="SharpGym.Silverlight.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
             xmlns:uriMapper="clr-namespace:System.Windows.Navigation;assembly=System.Windows.Controls.Navigation"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="849"
             d:DesignHeight="481" MinWidth="1024">
    <Grid Style="{StaticResource LayoutRootGridStyle}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Border Style="{StaticResource ContentBorderStyle}" Grid.Row="1">

            <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" Source="/Home"
                              Navigated="ContentFrame_Navigated" NavigationFailed="ContentFrame_NavigationFailed">
                <navigation:Frame.UriMapper>
                    <uriMapper:UriMapper>
                        <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml" />
                        <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml" />
                    </uriMapper:UriMapper>
                </navigation:Frame.UriMapper>
            </navigation:Frame>
        </Border>

        <Grid x:Name="NavigationGrid" Style="{StaticResource NavigationGridStyle}">

            <Border Style="{StaticResource BrandingBorderStyle}">
                <StackPanel Style="{StaticResource BrandingStackPanelStyle}">

                    <Image Source="Images/Logo.png" Height="90" Margin="15,5" />
                    <TextBlock Style="{StaticResource ApplicationNameStyle}" Text="SharpGym" />
                </StackPanel>
            </Border>

            <Border Style="{StaticResource LinksBorderStyle}">
                <StackPanel x:Name="LinksStackPanel" Style="{StaticResource LinksStackPanelStyle}">
                    <HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/Home" TargetName="ContentFrame"
                                     Content="{StaticResource HomeMenuItem}" />
                    <Rectangle Style="{StaticResource DividerStyle}" />
                    <HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/Alunos" TargetName="ContentFrame"
                                     Content="{StaticResource AlunosMenuItem}" />
                    <Rectangle Style="{StaticResource DividerStyle}" />
                    <HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/RegistrosDiarios"
                                     TargetName="ContentFrame" Content="{StaticResource RegistroMenuItem}" />
                    <Rectangle Style="{StaticResource DividerStyle}" />
                    <HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/AvaliacaoFisicas"
                                     TargetName="ContentFrame" Content="{StaticResource AvaliacaoMenuItem}" />
                    <Rectangle Style="{StaticResource DividerStyle}" />
                    <HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/Treinos"
                                     TargetName="ContentFrame" Content="{StaticResource TreinosMenuItem}" />
                    <Rectangle Style="{StaticResource DividerStyle}" />
                    <HyperlinkButton Style="{StaticResource LinkStyle}" NavigateUri="/About"
                                     TargetName="ContentFrame" Content="{StaticResource AboutMenuItem}" />
                </StackPanel>
            </Border>

        </Grid>

    </Grid>
</UserControl>